home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / programming / other / gui4cli / dir / dir.lha < prev    next >
Text File  |  1999-04-29  |  1KB  |  75 lines

  1. G4C
  2.  
  3.  
  4. WINBIG -1 -1 423 39 'Pack selected files/dirs to :'
  5. WinType 11110010
  6. varpath dir.gc
  7.  
  8. BOX 0 0 0 0 out button
  9.  
  10. xOnLoad
  11. gosub dir.lha startup
  12.  
  13. xOnReload
  14. gosub dir.lha startup
  15.  
  16. xRoutine StartUp
  17. old_dir  = $$G4C.DIR
  18. cd $$lv.dir
  19. lvmulti first
  20. if $lv_file = ""
  21.    ezreq "LHA:\nChoose some files first\nwhy don't you ?" OK ""
  22.    guiquit dir.lha
  23.    stop
  24. endif
  25. guiopen dir.lha
  26.  
  27. xOnOpen
  28. setgad dir.lha 2 ON
  29.  
  30. xOnClose
  31. guiquit dir.lha
  32.  
  33. xOnQuit
  34. cd $old_dir
  35.  
  36. xOnFail
  37. guiwindow dir.lha resume
  38.  
  39. ;========================= Gadgets
  40.  
  41. XTEXTIN 10 5 400 14 "" lha_string "RAM:MyArc.lha" 130
  42. gadid 2
  43. gadhelp 'Enter name of Archive'
  44.  
  45. XBUTTON 10 20 99 14 "Pack"
  46. gadhelp 'Click to start packing...'
  47. setvar lha_pack 'c:lha -r -x a $lha_string'
  48. while $lv_file > ""
  49.     extract lv_file file lha_file
  50.     appvar  lha_pack ' $lha_file'
  51.     lvmulti next
  52. endwhile
  53. setwintitle dir.lha "Packing files..."
  54. LAUNCH 1 '$lha_pack'
  55. guiwindow dir.lha wait
  56.  
  57.  
  58. xOnReturn 1
  59. guiwindow dir.lha resume
  60. guiquit dir.lha
  61.  
  62.  
  63. XBUTTON 230 20 78 14 "Browse.."
  64. gadhelp 'Choose another archive path'
  65. setvar lha_req ""
  66. ReqFile   -1 -1 300 -40 'Destination archive:' SAVE lha_req RAM:
  67. if $lha_req > ""
  68.    lha_string = $lha_req
  69.    update dir.lha 2 $lha_req
  70. endif
  71.  
  72.  
  73. XBUTTON 310 20 100 14 CANCEL
  74. GuiQuit dir.lha
  75.